package dmcs.inventorysystem.model;


import dmcs.inventorysystem.model.common.InventoryAM;
import dmcs.inventorysystem.model.views.BuildingsViewRowImpl;
import dmcs.inventorysystem.model.views.FloorsViewImpl;
import dmcs.inventorysystem.model.views.FloorsViewRowImpl;
import dmcs.inventorysystem.model.views.InventoryEntriesViewImpl;

import oracle.jbo.Row;
import oracle.jbo.RowIterator;
import oracle.jbo.server.ApplicationModuleImpl;
import oracle.jbo.server.ViewLinkImpl;
import oracle.jbo.server.ViewObjectImpl;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Thu Dec 22 21:37:36 CET 2011
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
public class InventoryAMImpl extends ApplicationModuleImpl implements InventoryAM {
    /**
     * This is the default constructor (do not remove).
     */
    public InventoryAMImpl() {
    }

    /**
     * Container's getter for InventoriesView1.
     * @return InventoriesView1
     */
    public ViewObjectImpl getInventoriesView1() {
        return (ViewObjectImpl)findViewObject("InventoriesView1");
    }

    /**
     * Container's getter for InventoryEntriesView1.
     * @return InventoryEntriesView1
     */
    public InventoryEntriesViewImpl getInventoryEntriesView1() {
        return (InventoryEntriesViewImpl)findViewObject("InventoryEntriesView1");
    }

    /**
     * Container's getter for FkIeInIdLink1.
     * @return FkIeInIdLink1
     */
    public ViewLinkImpl getFkIeInIdLink1() {
        return (ViewLinkImpl)findViewLink("FkIeInIdLink1");
    }

    /**
     * Container's getter for Dictionaries.
     * @return Dictionaries
     */
    public ApplicationModuleImpl getDictionaries() {
        return (ApplicationModuleImpl)findApplicationModule("Dictionaries");
    }

    /**
     * Container's getter for BuildingsView1.
     * @return BuildingsView1
     */
    public ViewObjectImpl getBuildingsView1() {
        return (ViewObjectImpl)findViewObject("BuildingsView1");
    }

    /**
     * Container's getter for FkBuInventoryLink1.
     * @return FkBuInventoryLink1
     */
    public ViewLinkImpl getFkBuInventoryLink1() {
        return (ViewLinkImpl)findViewLink("FkBuInventoryLink1");
    }

    /**
     * Container's getter for InvoicesView1.
     * @return InvoicesView1
     */
    public ViewObjectImpl getInvoicesView1() {
        return (ViewObjectImpl)findViewObject("InvoicesView1");
    }

    /**
     * Container's getter for FkInvInventory1.
     * @return FkInvInventory1
     */
    public ViewLinkImpl getFkInvInventory1() {
        return (ViewLinkImpl)findViewLink("FkInvInventory1");
    }

    /**
     * Container's getter for PersonsView1.
     * @return PersonsView1
     */
    public ViewObjectImpl getPersonsView1() {
        return (ViewObjectImpl)findViewObject("PersonsView1");
    }

    /**
     * Container's getter for FkPeInventoryLink1.
     * @return FkPeInventoryLink1
     */
    public ViewLinkImpl getFkPeInventoryLink1() {
        return (ViewLinkImpl)findViewLink("FkPeInventoryLink1");
    }


    /**
     * Container's getter for InvoiceEntriesView2.
     * @return InvoiceEntriesView2
     */
    public ViewObjectImpl getInvoiceEntriesView2() {
        return (ViewObjectImpl)findViewObject("InvoiceEntriesView2");
    }

    /**
     * Container's getter for FkIneInvInvoiceLink1.
     * @return FkIneInvInvoiceLink1
     */
    public ViewLinkImpl getFkIneInvInvoiceLink1() {
        return (ViewLinkImpl)findViewLink("FkIneInvInvoiceLink1");
    }

    /**
     * Container's getter for FloorsView1.
     * @return FloorsView1
     */
    public FloorsViewImpl getFloorsView1() {
        return (FloorsViewImpl)findViewObject("FloorsView1");
    }

    /**
     * Container's getter for FkFlBuildingLink1.
     * @return FkFlBuildingLink1
     */
    public ViewLinkImpl getFkFlBuildingLink1() {
        return (ViewLinkImpl)findViewLink("FkFlBuildingLink1");
    }

    /**
     * Container's getter for SpacesView1.
     * @return SpacesView1
     */
    public ViewObjectImpl getSpacesView1() {
        return (ViewObjectImpl)findViewObject("SpacesView1");
    }

    /**
     * Container's getter for FkSpFloorLink1.
     * @return FkSpFloorLink1
     */
    public ViewLinkImpl getFkSpFloorLink1() {
        return (ViewLinkImpl)findViewLink("FkSpFloorLink1");
    }
    
    public void createInsertFloorRow() {
        BuildingsViewRowImpl buildRow = (BuildingsViewRowImpl)getBuildingsView1().getCurrentRow();
        RowIterator floorsView = buildRow.getFloorsView();
        Row floorRow = floorsView.createRow();
        floorsView.insertRow(floorRow);
    }
    
    public void createLocation() {
        ViewObjectImpl buildingsView1 = getBuildingsView1();
        BuildingsViewRowImpl buildRow = (BuildingsViewRowImpl)buildingsView1.createRow();
        buildingsView1.insertRow(buildRow);
        RowIterator floorsView = buildRow.getFloorsView();
        FloorsViewRowImpl floorsRow = (FloorsViewRowImpl)floorsView.createRow();
        floorsView.insertRow(floorsRow);
        RowIterator spacesView = floorsRow.getSpacesView();
        Row spaceRow = spacesView.createRow();
        spacesView.insertRow(spaceRow);
    }

    /**
     * Container's getter for InventoryEntriesPersonView.
     * @return InventoryEntriesPersonView
     */
    public InventoryEntriesViewImpl getInventoryEntriesPersonView() {
        return (InventoryEntriesViewImpl)findViewObject("InventoryEntriesPersonView");
    }

    /**
     * Container's getter for FkIePersonsLink1.
     * @return FkIePersonsLink1
     */
    public ViewLinkImpl getFkIePersonsLink1() {
        return (ViewLinkImpl)findViewLink("FkIePersonsLink1");
    }

    /**
     * Container's getter for InventoryEntriesInvoiceView.
     * @return InventoryEntriesInvoiceView
     */
    public InventoryEntriesViewImpl getInventoryEntriesInvoiceView() {
        return (InventoryEntriesViewImpl)findViewObject("InventoryEntriesInvoiceView");
    }

    /**
     * Container's getter for FkIeInvoiceEntryLink1.
     * @return FkIeInvoiceEntryLink1
     */
    public ViewLinkImpl getFkIeInvoiceEntryLink1() {
        return (ViewLinkImpl)findViewLink("FkIeInvoiceEntryLink1");
    }
}
